<?php
include('functions.php');
$commit = $this->commit;
function show_resu($array) {
    foreach($array as $key => $row) {
        if ($key == 0 && $row->parentId == 0) {
            $arr = mbstringtoarray($row->content, "utf8");
            $str = (array_key_exists(1 ,$arr)) ? str_pad($arr[0], strlen($arr[0]) + 3, "."):$arr[0];
            echo '<li commitId=' . $row->Id . ' blogId=' . $row->blogId . ' style="font-size:1.2em"><p style="float:left"><a class="commit_re" herf="#">Re:</a></p><p>' . $str . '</p></li>';
        } else if($key == 0 && $row->parentId != 0){
            echo '<li commitId=' . $row->Id . ' blogId=' . $row->blogId . '><p>' . $row->content . '</p><p><span>from '. $row->from . '</span><a class="commit_re" herf="#">re</a><p></li>';
        } else {
            echo '<ul class="commit_ul">';
            show_resu($row);
            echo '</ul>';
        }
    }
}
?>

<div id='commit_sh'>
    <ul class='title_ul'>
<?php show_resu($commit[0][$this->commitId]); ?>
    </ul>
</div>
